package com.ruoyi.project.pm.progressinquiry.domain;

import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Date;

/**
 * @author 铁蛋儿
 * @date 2020-09-18 10:28
 * @desc 百战程序员 http://www.itbaizhan.com
 *
 * 项目进度查询 对象
 *
 */
public class PMPI extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**项目信息id*/
    @Excel(name = "项目id",cellType = Excel.ColumnType.NUMERIC)
    private Integer pmId;

    /**客户id*/
    @Excel(name = "客户id")
    private Integer csId;

    /**订单id*/
    @Excel(name = "订单id")
    private Integer orderId;

    /**项目编号*/
    @Excel(name = "项目编号")
    private String pmNum;

    /**项目名称*/
    @Excel(name = "项目名称")
    private String pmName;

    /**项目类别*/
    @Excel(name = "项目类别")
    private String pmClasses;

    /**客户*/
    @Excel(name = "客户")
    private String pmClient;

    /**项目状态（0未完成  1完成）*/
    @Excel(name = "项目状态",readConverterExp = "0=为完成,1=完成")
    private Integer pmStatus;

    /**项目负责人*/
    @Excel(name = "项目负责人")
    private String pmPrincipal;

    /**项目金额*/
    @Excel(name = "项目金额",cellType = Excel.ColumnType.NUMERIC)
    private double pmMoney;

    /**项目周期*/
    @Excel(name = "项目周期")
    private String pmCycle;

    /**项目内容*/
    @Excel(name = "项目内容")
    private String pmContent;

    /**项目类型*/
    @Excel(name = "项目风格")
    private String pmStyle;

    /** 项目类型 0普通  1加急  2重点项目*/
    @Excel(name = "项目类型")
    private Integer pmType;

    /**项目订立时间*/
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "项目订立时间")
    private Date pmMtime;

    /**项目完成时间*/
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "项目完成时间")
    private Date pmEtime;

    @Override
    public String toString() {
        return "PMInfo{" +
                "pmId=" + pmId +
                ", csId=" + csId +
                ", orderId=" + orderId +
                ", pmNum='" + pmNum + '\'' +
                ", pmName='" + pmName + '\'' +
                ", pmClasses='" + pmClasses + '\'' +
                ", pmClient='" + pmClient + '\'' +
                ", pmStatus=" + pmStatus +
                ", pmPrincipal='" + pmPrincipal + '\'' +
                ", pmMoney=" + pmMoney +
                ", pmCycle='" + pmCycle + '\'' +
                ", pmContent='" + pmContent + '\'' +
                ", pmStyle='" + pmStyle + '\'' +
                ", pmType=" + pmType +
                ", pmMtime=" + pmMtime +
                ", pmEtime=" + pmEtime +
                '}';
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getPmId() {
        return pmId;
    }

    public void setPmId(Integer pmId) {
        this.pmId = pmId;
    }

    public Integer getCsId() {
        return csId;
    }

    public void setCsId(Integer csId) {
        this.csId = csId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public String getPmNum() {
        return pmNum;
    }

    public void setPmNum(String pmNum) {
        this.pmNum = pmNum;
    }

    public String getPmName() {
        return pmName;
    }

    public void setPmName(String pmName) {
        this.pmName = pmName;
    }

    public String getPmClasses() {
        return pmClasses;
    }

    public void setPmClasses(String pmClasses) {
        this.pmClasses = pmClasses;
    }

    public String getPmClient() {
        return pmClient;
    }

    public void setPmClient(String pmClient) {
        this.pmClient = pmClient;
    }

    public Integer getPmStatus() {
        return pmStatus;
    }

    public void setPmStatus(Integer pmStatus) {
        this.pmStatus = pmStatus;
    }

    public String getPmPrincipal() {
        return pmPrincipal;
    }

    public void setPmPrincipal(String pmPrincipal) {
        this.pmPrincipal = pmPrincipal;
    }

    public double getPmMoney() {
        return pmMoney;
    }

    public void setPmMoney(double pmMoney) {
        this.pmMoney = pmMoney;
    }

    public String getPmCycle() {
        return pmCycle;
    }

    public void setPmCycle(String pmCycle) {
        this.pmCycle = pmCycle;
    }

    public String getPmContent() {
        return pmContent;
    }

    public void setPmContent(String pmContent) {
        this.pmContent = pmContent;
    }

    public String getPmStyle() {
        return pmStyle;
    }

    public void setPmStyle(String pmStyle) {
        this.pmStyle = pmStyle;
    }

    /**
     * 项目类型 0普通 1重点项目
     * 这里因为控制器中的startPage()会用到这个字段，如果直接在这里改的话会出现错误
     * org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
     * ### Error querying database.  Cause: java.lang.NullPointerException
     * ### The error may exist in file [E:\Git_REPO\zhizun\target\classes\mybatis\pm\PMInfoMapper.xml]
     * ### The error may involve com.ruoyi.project.pm.info.mapper.PMInfoMapper.selectPMInfoList_COUNT
     * ### The error occurred while handling results
     * ### SQL: SELECT count(0) FROM pm_info
     * ### Cause: java.lang.NullPointerException
     * 解决办法：
     *      构造一个VO来传递需要在页面展示的数据
     * */
    public Integer getPmType() {
//        return pmType ==0 ? "普通项目":"重点项目";
        return pmType;
    }

    public void setPmType(Integer pmType) {
        this.pmType = pmType;
    }

    public Date getPmMtime() {
        return pmMtime;
    }

    public void setPmMtime(Date pmMtime) {
        this.pmMtime = pmMtime;
    }

    public Date getPmEtime() {
        return pmEtime;
    }

    public void setPmEtime(Date pmEtime) {
        this.pmEtime = pmEtime;
    }

    public PMPI(Integer pmId, Integer csId, Integer orderId, String pmNum, String pmName, String pmClasses, String pmClient, Integer pmStatus, String pmPrincipal, double pmMoney, String pmCycle, String pmContent, String pmStyle, Integer pmType, Date pmMtime, Date pmEtime) {
        this.pmId = pmId;
        this.csId = csId;
        this.orderId = orderId;
        this.pmNum = pmNum;
        this.pmName = pmName;
        this.pmClasses = pmClasses;
        this.pmClient = pmClient;
        this.pmStatus = pmStatus;
        this.pmPrincipal = pmPrincipal;
        this.pmMoney = pmMoney;
        this.pmCycle = pmCycle;
        this.pmContent = pmContent;
        this.pmStyle = pmStyle;
        this.pmType = pmType;
        this.pmMtime = pmMtime;
        this.pmEtime = pmEtime;
    }

    public PMPI() {
    }
}
